<!--<div id="main">
    <div class="container-fluid">
        <div class="page-header">
        	<div class="pull-left">
        		<h1>cms文章管理</h1>
        	</div>
        	<div class="pull-right">
        		<ul class="stats">
        			<li class='lightred'>
        				<i class="icon-calendar"></i>
        				<div class="details">
        					<span class="big"></span>
        					<span></span>
        				</div>
        			</li>
        		</ul>
        	</div>
        </div>
        <div class="breadcrumbs">
        	<ul>
        		<li>
        			<a href="javascript:void(0);">后台管理</a>
        			<i class="icon-angle-right"></i>
        		</li>
        		<li>
        			<a href="javascript:void(0);">系统管理</a>
        			<i class="icon-angle-right"></i>
        		</li>
        		<li>
        			<a href="javascript:void(0);">cms文章管理</a>
        		</li>
        	</ul>
        	<div class="close-bread">
        		<a href="#"><i class="icon-remove"></i></a>
        	</div>
        </div>
        <div class="row-fluid">
        	<div class="span12">
        		<div class="box box-color box-bordered">
        			<div class="box-title">
        				<h3>
        					<i class="icon-th-list"></i>
        					cms文章管理
        				</h3>
                        <div class="actions">
        					<a rel="tooltip" data-original-title="添加" href="<?=$this->url('cms/infoEdit')?>" class="btn btn-danger"><i class="icon-plus"></i> 添加文章</a>
        				</div>
        			</div>
        			<div class="box-content nopadding">
        				<table class="table table-hover table-nomargin dataTable table-bordered" width="100%">
        					<thead>
        						<tr>
        							<th>标题</th>
        							<th>类别</th>
        							<th>背景图</th>
        							<th>图标</th>
        							<th>文档地址</th>
        							<th>简介</th>
        							<th>状态</th>
        							<th>时间</th>
                                    <th>操作</th>
        						</tr>
        					</thead>
                            <?
                                foreach($re as $k=>$v){
                                    ?>
                                    <tr>
            							<td><?=$v['title']?></td>
            							<td><?=$v['tdname']?></td>
            							<td><?=empty($v['imgurl'])?'':'<img src="'.$v['imgurl'].'"  style="width: 100px;height: 50px;" />'?></td>
            							<td><?=empty($v['imgicon'])?'':'<img src="'.$v['imgicon'].'"  style="width: 30px;height: 30px;" />'?></td>
                                        <td><?=$v['texturl']?></td>
            							<td><div><?=mb_substr($v['briefing'],0,10,'UTF-8')?>...</div></td>
            							<td>
                                            <?
                                            if($v['status']==1){
                                                echo "<font color='green'>使用中</font>";
                                            }elseif($v['status']==2){
                                                echo "<font color='red'>已禁用</font>";
                                            }
                                            ?>
                                        </td>
            							<td><?=date("Y-m-d H:i:s",$v['created'])?></td>
            							<td style="min-width: 100px;">
                                            <a data-original-title="修改" rel="tooltip" class="btn btn-small btn-success" href="javascript:pub_alert_html('<?=$this->url("cms/infoEdit?id=".$v['id'])?>',true,true);"><i class="icon-edit"></i></a>
                                            <a href="javascript:pub_alert_confirm(this,'确定该操作？','<?=$this->url("cms/infoStatus")?>?id=<?=$v["id"]?>');" class="btn btn-small btn-danger" style="background-color: <?=$v['status']==1?'':'#40bf40'?>;"><?=$v['status']==1?'禁用':'使用'?></a>
                                            <a href="javascript:pub_alert_confirm(this,'删除不可恢复，确定要删除吗？','<?=$this->url("cms/infoDel")?>?id=<?=$v["id"]?>');" class="btn btn-small btn-danger" title="删除"><i class="icon-remove"></i></a>
						                </td>
            						</tr>
                                    <?
                                }
                            ?>
        				</table>
        			</div>
        		</div>
        	</div>
        </div>
    </div>
</div>-->
<div class="main-content">
	<!-- #section:basics/content.breadcrumbs -->
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<ul class="breadcrumb"><li>
			<i class="ace-icon fa fa-th-large th-large-icon"></i> cms管理 <i class="ace-icon fa fa-angle-double-right"></i> 文章管理 
		</li></ul><!-- /.breadcrumb -->
	</div>

	<!-- /section:basics/content.breadcrumbs -->
	<div class="page-content">
		<!-- #section:settings.box -->
		<div class="ace-settings-container" id="ace-settings-container" style="margin-top:-48px;">
			<div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
				<i class="ace-icon fa fa-cog bigger-150"></i>
			</div>
			<div class="ace-settings-box clearfix" id="ace-settings-box">
				<div class="pull-left width-50">
					<!-- #section:settings.skins -->
					<div class="ace-settings-item">
						<div class="pull-left">
							<select id="skin-colorpicker" class="hide">
								<option data-skin="no-skin" value="#438EB9" <?=!isset($_COOKIE['ace_skin'])||$_COOKIE['ace_skin']!='no-skin'?'selected':''?> >#438EB9</option>
								<option data-skin="skin-1" value="#222A2D" <?=isset($_COOKIE['ace_skin'])&&$_COOKIE['ace_skin']=='skin-1'?'selected':''?> >#222A2D</option>
								<option data-skin="skin-2" value="#C6487E" <?=isset($_COOKIE['ace_skin'])&&$_COOKIE['ace_skin']=='skin-2'?'selected':''?> >#C6487E</option>
								<option data-skin="skin-3" value="#D0D0D0" <?=isset($_COOKIE['ace_skin'])&&$_COOKIE['ace_skin']=='skin-3'?'selected':''?> >#D0D0D0</option>
							</select>
						</div>
						<span>&nbsp;肤色切换</span>
					</div>

					<!-- /section:settings.skins -->

					<!-- #section:settings.navbar -->
					<div class="ace-settings-item">
						<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar" />
						<label class="lbl" for="ace-settings-navbar">&nbsp; 固定导航</label>
					</div>

					<!-- /section:settings.navbar -->

					<!-- #section:settings.sidebar -->
					<div class="ace-settings-item">
						<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar" />
						<label class="lbl" for="ace-settings-sidebar">&nbsp; 固定菜单栏</label>
					</div>
					<!-- /section:settings.sidebar -->
					
					<!-- #section:settings.container -->
					<div class="ace-settings-item">
						<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container" />
						<label class="lbl" for="ace-settings-add-container">&nbsp; 宽窄屏切换</label>
					</div>
					<!-- /section:settings.container -->
				</div><!-- /.pull-left -->

				<div class="pull-left width-50">
					<!-- #section:basics/sidebar.options -->
					<div class="ace-settings-item">
						<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-hover" />
						<label class="lbl" for="ace-settings-hover">&nbsp; 内级栏目切换</label>
					</div>

					<div class="ace-settings-item">
						<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-compact" />
						<label class="lbl" for="ace-settings-compact">&nbsp; 菜单栏切换</label>
					</div>

					<div class="ace-settings-item">
						<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-highlight" />
						<label class="lbl" for="ace-settings-highlight">&nbsp; 当前菜单凸显</label>
					</div>
					<!-- /section:basics/sidebar.options -->
				</div><!-- /.pull-left -->
			</div><!-- /.ace-settings-box -->
		</div><!-- /.ace-settings-container -->

		<!-- /section:settings.box -->
		<div class="page-content-area">
			<div class="row">
				<div class="col-xs-12">
					<form class="form-horizontal" role="form" action="" method="get">
						<div class="form-group col-sm-10 col-xs-10">
							<input type="text" name="keywords" value="<?=$keywords?>" placeholder="关键字:多个用‘英文逗号’隔开" class="col-xs-8 col-sm-5" data-rel="tooltip" title="关键字:多个用‘英文逗号’隔开">
							&nbsp;<button class="btn btn-info btn-sm" data-rel="tooltip" title="搜索"><i class="ace-icon fa fa-search"></i><span class="hidden-480">search</span></button>
						</div>
					</form>
					<button class="btn btn-info btn-sm pull-right" onclick="window.location.href='<?=$this->url("cms/infoEdit")?>'" data-rel="tooltip" title="添加文章"><i class="ace-icon fa fa-plus"></i><span class="hidden-480">添加文章</span></button>
					<div class="table-responsive">
						<table class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
        							<th>标题</th>
        							<th>类别</th>
        							<th>封面</th>
        							<th>文档地址</th>
        							<th>简介</th>
        							<th>状态</th>
        							<th>发布时间</th>
        							<th>操作时间</th>
                                    <th>操作</th>
								</tr>
							</thead>

							<tbody>
								<?
								if($re){
									foreach($re as $k=>$v){?>
										<tr>
											<td><?=$v['title']?></td>
											<td><?=$v['motle']?></td>
											<td><?=$v['imgurl']?'<img src="'.$v['imgurl'].'"  style="width: 100px;height: 50px;" />':''?></td>
											<td><?=$v['texturl']?></td>
											<td><div><?=mb_substr($v['briefing'],0,10,'UTF-8')?>...</div></td>
											<td><?=$v['status']==1?'<font class="badge badge-success">正常</font>':'<font class="badge badge-danger">禁用</font>'?></td>
											<td><?=$v['ktime']?></td>
											<td><?=$v['created']?></td>
											<td>
												<div class="action-buttons">
													<a class="green" href="<?=$this->url('cms/infoEdit?kid='.$v['id'])?>" data-rel="tooltip" title="修改"><i class="ace-icon fa fa-pencil bigger-130"></i></a>
													<a class="red" href="javascript:;" onclick="delAccount('<?=$v['id']?>')" data-rel="tooltip" title="删除"><i class="ace-icon fa fa-trash-o bigger-130"></i></a>
												</div>
											</td>
										</tr>
									<?}
								}
								?>
							</tbody>
						</table>
					</div>
					<?=$pageHtml?>
				</div><!-- /.col -->
			</div><!-- /.row -->
		</div><!-- /.page-content-area -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
<!-- inline scripts related to this page -->

<script type="text/javascript">
function delAccount(kid){
	if(confirm("确认删除？删除后将不可恢复！")){
		$.ajax({
			type:'POST',
			url:'<?=$this->url("cms/delInfo")?>',
			data:'kid='+kid,
			dataType:'json',
			success:function(r){
				if(r.state==1){
					gritter("gritter-success gritter-light",3000,"操作提示",r.html);
					setTimeout('window.location.reload()',3000);
				}else{
					gritter("gritter-error gritter-light",3000,"操作提示",r.html);
				}
			},
			error:function(){
				gritter("gritter-error gritter-light",3000,"操作提示","网络错误！请联系我方工作人员。");
			}
		});
	}
}
</script>